<?php session_start();?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<?php 
	$_username = trim($_POST['username']);//
	$_password = md5(trim($_POST['password'])); //md5加密
	require '../public/conn.php';
	$_result = mysql_query("SELECT * FROM users WHERE username='$_username'
		AND password='$_password'");
	$_isUserExist= mysql_fetch_array($_result);
	if(!$_isUserExist){//未找到匹配用户;
		header("location:../face/login-face.php?tip=1");
	}else{
		$_SESSION['username'] = $_username;
		header("location:../home/home.php");
	}
?>
</body>
</html>